import request from '@/plugins/axios/request';
import { downloadUrlMode } from "@/plugins/axios/dowload";
const baseURL = process.env.VUE_APP_BASE_API;

// 指南列表
export function getGuide(data) {
  return request({
    url: `${baseURL}/tech-guide/getList`,
    method: 'POST',
    data: data
  })
}
// 新增
export function addGuide(data) {
  return request({
    url: `${baseURL}/tech-guide/add`,
    method: 'POST',
    data: data
  })
}
// 编辑
export function updateGuide(data) {
  return request({
    url: `${baseURL}/tech-guide/update`,
    method: 'POST',
    data: data
  })
}
// 删除
export function deletes(data) {
  return request({
    url: `${baseURL}/tech-guide/delete`,
    method: 'POST',
    data: data
  })
}
// 下载模板
export function downloadTemplate(data) {
  return request({
    url: `${baseURL}/tech-guide/downloadTemplate`,
    method: 'GET',
    params: data,
    isDownLoadFile: true
  })
}

// 上传模板
export function uploadAndExtractItem(data) {
  return request({
    url: `${baseURL}/tech-guide/uploadAndExtractItem`,
    method: 'POST',
    data: data
  })
}
// 查询指南条目
export function getItemList(data) {
  return request({
    url: `${baseURL}/tech-guide/getItemList`,
    method: 'POST',
    data: data
  })
}
// 详情
export function getDetail(data) {
  return request({
    url: `${baseURL}/tech-guide/getDetail`,
    method: 'GET',
    params: data
  })
}
// 指南树
export function getTreeList(data) {
  return request({
    url: `${baseURL}/tech-guide/getTreeList`,
    method: 'GET',
    params: data
  })
}